import {http} from "@/interceptor/luch-request/index.js"
// 创建学校
export const saveSchool = (data) => {
    return http.post("api/admin/school/v1/saveSchool", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}
// 学校列表
export const pageSchool = (data) => {
	return http.get("api/admin/school/v1/pageSchool", {
		data: data
	});
}
// 学校详情
 export const schoolInfo = (id) => {
 	return http.get("api/admin/school/v1/info/"+id);
 }
export const deleteSchool = (data) => {
    return http.delete("api/admin/school/v1/deleteSchool",data,{
		header:{
			"content-type": "application/json"
		}
	});	
} 

export const updateSchool = (data) => {
    return http.put("api/admin/school/v1/updateSchool",data,{
		header:{
			"content-type": "application/json"
		}
	});	
}

// 全站管理员保存学校
export const saveOrganization = (data) => {
    return http.post("api/admin/basicDept/v1/saveOrganization", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}

// GET /api/admin/basicDept/v1/AllStationDept
// 学校列表new
export const listTree = (data) => {
	return http.get("api/admin/basicDept/v1/AllStationDept", {
		data: data
	});
}


export const page = (data) => {
	return http.get("api/admin/staff/v1/listAllStaff", {
		data: data
	});
}



export const update = (data) => {
    return http.put("api/admin/basicDept/v1/update",data,{
		header:{
			"content-type": "application/json"
		}
	});	
}

export const deleteDept = (id) => {
  	return http.delete("api/admin/basicDept/v1/delete/"+id, {
  		header:{
  			"content-type": "application/x-www-form-urlencoded"
  		}
  	});
 }

export const basicUserDeptpage = (data) => {
	return http.get("api/admin/basicUserDept/v1/page", {
		data: data
	});
}


export const basicUserDeptlist = (data) => {
	return http.get("api/app/basicUserDept/v1/list", {
		data: data
	});
}



export const basicUserDeptpost = (id) => {
  	return http.post("api/app/basicUserDept/v1/post/"+id, {
  		header:{
  			"content-type": "application/x-www-form-urlencoded"
  		}
  	});
 }